/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ResultEditor.Annotations;

import java.util.Vector;

/**structure of article which contains a lot of annotations
 * @author Chris
 */
public class Article{
        /**file name of related text source*/
        public String filename;

        /**vector which store all annotation information of this article */
        public Vector<Annotation> annotations = new Vector<Annotation>();

        public Article baseArticle;

        public Article(String filename){
            this.filename = filename;
        }
        
        public void addAnnotation(Annotation toAdd)
        {
            annotations.add(toAdd);
        }

        public String toString()
        {
            return filename;
        }
        
        public Annotation getAnnotationByMention(String mention)
        {
            for(Annotation annot: annotations)
            {
                if(annot.mentionid.equals(mention))
                    return annot;
            }
            return null;
        }
}



